﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Main
{
    public class Floor
    {
        public static int FloorW = 65;
        public static int FloorH = 24;

        public Cell[,] Map { get; set; }
        public CellFactory Factory { get; set; }


        public Floor()
        {
            Map = new Cell[FloorW, FloorH];
            Factory = new CellFactory();
            CellInit();
        }

        private void CellInit()
        {
            for (int y = 0; y < FloorH; y++)
            {
                for (int x = 0; x < FloorW; x++)
                {
                    if (x == 0 || y == 0 || x == FloorW - 1 || y == FloorH - 1)
                    {
                        Cell cell = Factory.MakeCell(CellType.Wall);
                        Map[x, y] = cell;
                    }
                    else
                    {
                        Cell cell = Factory.MakeCell(CellType.Floor);
                        Map[x, y] = cell;
                    }
                }
            }
        }

    }
}
